package dao;


import pojo.Addpower;

import java.sql.SQLException;
import java.util.ArrayList;

public interface AddpowerDao {
    /**
     * 查询某区域所有用户addpower的权限
     *
     * @param mid
     * @return
     * @throws SQLException
     * @throws ClassNotFoundException
     */
    ArrayList<Addpower> findAreaUserPower(Integer mid) throws SQLException, ClassNotFoundException;

    /**
     * 添加禁止权限
     *
     * @param mid
     * @param uid
     * @return
     * @throws SQLException
     */
    boolean addAddpower(Integer mid, Integer uid) throws SQLException;

    /**
     * 取消禁止权限
     *
     * @param mid
     * @param uid
     * @return
     * @throws SQLException
     */
    boolean deleteAddpower(Integer mid, Integer uid) throws SQLException;

    /**
     * 查找用户各个区域的权限
     *
     * @param uid
     * @return
     * @throws SQLException
     * @throws ClassNotFoundException
     */
    ArrayList<Addpower> findUserPower(Integer uid) throws SQLException, ClassNotFoundException;
}
